package com.example.day2.db;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;


import com.example.day2.entity.VideoResult;

import java.util.List;

@Dao
public abstract class StoreVideoDap {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public abstract void add(VideoResult.DataBean dataBean);
    @Delete
    public abstract void delete(VideoResult.DataBean dataBean);

    @Query("select * from store_video")
    public abstract List<VideoResult.DataBean> getAll();

    @Query("select * from store_video where id=:id")
    public abstract VideoResult.DataBean getById(int id);
}
